package com.appstore.service.impl;

import com.appstore.mapper.UserMapper;
import com.appstore.domain.entity.User;
import com.appstore.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;
    @Override
    public User getById(Long id) {
        return userMapper.getById(id);
    }

    @Override
    public int register(User user) {
        return userMapper.register(user);
    }

    @Override
    public User getByUserName(String name) {
        return userMapper.getByUsername(name);
    }
}
